import { post, get } from '@/http/index'
import type { CourseModel } from '@/type/Course'
import { DeconstructionKvModel } from '@/utils/objUtils'
export async function getCourse(pk: string) {
  return await get<CourseModel>("Course/Get", { pk: pk })
}

export async function listCourse(cond: any) {
  return await post<CourseModel>("Course/List", cond)
}

export async function saveCourse(data: CourseModel) {
  DeconstructionKvModel(data)
  return await post<CourseModel>("Course/Save", data)
}